home *** CD-ROM | disk | FTP | other *** search
- Path: news.iadfw.net!usenet
- From: Larry Weiss <lfw@iadfw.net>
- Newsgroups: comp.lang.c
- Subject: Re: Tradition or what?
- Date: Sun, 10 Mar 1996 19:08:29 -0600
- Organization: ...
- Message-ID: <31437D0D.3D91@iadfw.net>
- References: <danpop.825961872@rscernix> <313C5CD1.1209@oc.com> <danpop.826211387@rscernix> <DnxB7J.G7r@cwi.nl>
- NNTP-Posting-Host: dal03-27.ppp.iadfw.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- Dik T. Winter wrote:
- >
- > Similar things do happen in integer code too. Take binary search; you
- > happen to divide by two a lot. Change that to a macro? What sensible
- > name do you suggest; and what would be the result if you change the
- > constant? Moreover, the suggestion that using macro's makes changes
- > easier and simpler to comprehend are *not* true. They lead to the
- > cases where code starts with:
- > #define THREE 4
- > and in many cases it is not possible (in my opinion) to pick up more
- > sensible names.
- >
- > The rule as such is *not* good. There are too many cases where the
- > rule obscures the actual algorithm used.
-
- Obviously from my previous postings, I agree with you.
-
- I'm looking forward to answers to your specific questions from those who would
- justify the elimination of all literal non-zero numeric constants outside
- a #define or enum context.
-
- I'm also still waiting for someone to take up my challenge to actually examine
- their sources and then report that they found no non-zero numeric literals,
- or that they were mistaken in the use of every one they discovered.
-